package com.itheima.junitfield;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

public class Test {
    public static void main(String[] args) throws NoSuchMethodException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, NoSuchFieldException {


        Class<pig> pigClass = pig.class;
        //公共的变量
        Field [] field = pigClass.getFields();
        //所有的变量
        Field[] declaredFields = pigClass.getDeclaredFields();
        //获取公共的构造方法
        Field sex = pigClass.getField("sex");
        //获取所有的构造方法
        Field declaredField = pigClass.getDeclaredField("");


    }
}
